export default {
  namespaced: true,
  state: {
    isTried: false,
    promoterDrawer: false, // 发起人
    flowPermission1: {}, // 发起人设置
    approverDrawer: false, // 审核人
    approverConfig1: {}, // 审核人设置
    copyerDrawer: false, // 抄送人
    copyerConfig1: {}, // 抄送人设置
    conditionDrawer: false, // 条件
    conditionsConfig1: { // 条件设置
      conditionNodes: []
    }
  },
  getters: {

  },
  actions: {
    setIsTried({ commit }, payload) {
      commit('setIsTried', payload)
    },
    setPromoter({ commit }, payload) {
      commit('setPromoter', payload)
    },
    setFlowPermission({ commit }, payload) {
      commit('setFlowPermission', payload)
    },
    setApprover({ commit }, payload) {
      commit('setApprover', payload)
    },
    setApproverConfig({ commit }, payload) {
      commit('setApproverConfig', payload)
    },
    setCopyer({ commit }, payload) {
      commit('setCopyer', payload)
    },
    setCopyerConfig({ commit }, payload) {
      commit('setCopyerConfig', payload)
    },
    setCondition({ commit }, payload) {
      commit('setCondition', payload)
    },
    setConditionsConfig({ commit }, payload) {
      commit('setConditionsConfig', payload)
    }
  },
  mutations: {
    setIsTried(status, payload) {
      status.isTried = payload
    },
    setPromoter(status, payload) {
      status.promoterDrawer = payload
    },
    setFlowPermission(status, payload) {
      status.flowPermission1 = payload
    },
    setApprover(status, payload) {
      status.approverDrawer = payload
    },
    setApproverConfig(status, payload) {
      status.approverConfig1 = payload
    },
    setCopyer(status, payload) {
      status.copyerDrawer = payload
    },
    setCopyerConfig(status, payload) {
      status.copyerConfig1 = payload
    },
    setCondition(status, payload) {
      status.conditionDrawer = payload
    },
    setConditionsConfig(status, payload) {
      status.conditionsConfig1 = payload
    }
  }
}
